<template>
  <div class="parent">
    <!-- 将 A 组件传送到 body 中，而不受当前组件的 position: relative; 定位影响 -->
    <Teleport :disabled="false" to="body">
      <A />
    </Teleport>
  </div>
</template>

<script setup lang="ts">
import A from "./A.vue";
</script>

<style scoped>
.parent {
  position: relative;
  width: 100%;
  height: 50vh;
  background: yellowgreen;
}
</style>
